// import { printUnitNum } from '@/views/permission/wipManagement/productionCenter/components/productionHomepage/options/jinchang/home/adjustingSetting/printUnit';

const printUnitNum = 3;

const printUnitList: any = [];

for (let i = 0; i < printUnitNum; i++) {
  const key = i + 1;

  printUnitList.push(
    {
      id: '01',
      code: 3,
      type: 'D',
      offset: 0,
      startOffset: 1,
      modId: 1,
      modbusId: `41${key}`,
      plcId: `${key}color`,
      list: [
        {
          code: 6,
          name: `${key}色墨颜色`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingColor`,
          describes: '0 黑  1 蓝  2 绿  3 天蓝  4红  5玫瑰花 6黄  7白',
          type: 'int16',
          leng: 2,
          decimalPlaces: 0
        }, //D1
        {
          leng: 28
        },
        {
          code: 6,
          name: `${key}色墨泵运行时间`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingInkPumpRunningTime`,
          describes: '',
          type: 'int16',
          leng: 2,
          decimalPlaces: 1,
          decimal: 1
        }, //D16
        {
          code: 6,
          name: `${key}色墨泵周期时间`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingInkPumpCycleTime`,
          describes: '',
          type: 'int16',
          leng: 2,
          decimalPlaces: 1,
          decimal: 1
        } //D17
      ]
    },
    {
      id: '01',
      code: 3,
      type: 'D',
      offset: 0,
      startOffset: 88,
      modId: 1,
      modbusId: `31${key}`,
      plcId: `${key}color`,
      list: [
        {
          code: 10,
          name: `${key}色相位设定值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPhaseSet`,
          describes: '',
          computedType: 'ride', //plus reduce ride except 加减乘除
          computedNum: 1282.932,
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D88-D89
        {
          code: 10,
          name: `${key}色横移设定值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorHorizontalShiftSet`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D90-D91
        {
          code: 10,
          name: `${key}色印压间隙设定值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPrintingGapSet`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D92-D93
        {
          code: 10,
          name: `${key}色网棍间隙设定值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorScreenBarGapSet`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D94-D95
        {
          code: 10,
          name: `${key}色贴板位置设定值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPlatePositionSet`,
          describes: '',
          computedType: 'ride', //plus reduce ride except 加减乘除
          computedNum: 1282.932,
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D96-D97
        {
          code: 10,
          name: `${key}色印刷位置设定值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPrintingPositionSet`,
          describes: '',
          computedType: 'ride', //plus reduce ride except 加减乘除
          computedNum: 1282.932,
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D98-D99
        {
          code: 10,
          name: `${key}色轴Max`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingAxisMax`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D100-D101
        {
          code: 10,
          name: `${key}色着墨Max`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingInkingMax`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D102-D103
        {
          code: 10,
          name: `${key}色压印Max`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingStampMax`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D104-D105
        {
          leng: 8
        }, //D
        {
          code: 10,
          name: `${key}色轴Min`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingAxisMin`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D110-D111
        {
          code: 10,
          name: `${key}色着墨Min`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingInkingMin`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D112-D113
        {
          code: 10,
          name: `${key}色压印Min`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingStampMin`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        } //D114-D115
      ]
    },
    {
      id: '01',
      code: 3,
      type: 'D',
      offset: 0,
      startOffset: 2100,
      modId: 1,
      modbusId: `41${key}`,
      plcId: `${key}color`,
      list: [
        {
          code: 10,
          name: `${key}色零位点实际值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorZeroSpotGet`,
          describes: '',
          computedType: 'ride', //plus reduce ride except 加减乘除
          computedNum: 1282.932,
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D2100-D2101
        {
          code: 10,
          name: `${key}色相位实际值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPhaseGet`,
          describes: '',
          computedType: 'ride', //plus reduce ride except 加减乘除
          computedNum: 1282.932,
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D2102-D2103
        {
          code: 10,
          name: `${key}色横移实际值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorHorizontalShiftGet`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D2104-D2105
        {
          code: 10,
          name: `${key}色印压间隙实际值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPrintingGapGet`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        }, //D2106-D2107
        {
          code: 10,
          name: `${key}色网棍间隙实际值`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorScreenBarGapGet`,
          describes: '',
          type: 'float',
          leng: 4,
          decimalPlaces: 0,
          byteOrder: 'CDAB'
        } //D2108-D2109
      ]
    },
    {
      id: '01',
      code: 1,
      type: 'M',
      offset: 0,
      startOffset: 0,
      modId: 1,
      modbusId: `51${key}`,
      plcId: `${key}color`,
      list: [
        {
          code: 5,
          name: `${key}色相位+`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPhaseAdd`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.00 M0
        {
          code: 5,
          name: `${key}色横移+`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorHorizontalShiftAdd`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.01 M1
        {
          code: 5,
          name: `${key}色印压间隙+`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPrintingGapAdd`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.02 M2
        {
          code: 5,
          name: `${key}色网棍间隙+`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorScreenBarGapAdd`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.03 M3
        {
          leng: 2
        }, //w0.04 M4
        {
          code: 5,
          name: `${key}色相位-`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPhaseSub`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.05 M5
        {
          code: 5,
          name: `${key}色横移-`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorHorizontalShiftSub`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.06 M6
        {
          code: 5,
          name: `${key}色印压间隙-`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPrintingGapSub`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.07 M7
        {
          code: 5,
          name: `${key}色网棍间隙-`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorScreenBarGapSub`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.08 M8
        {
          leng: 2
        }, //w0.09 M9
        {
          code: 5,
          name: `${key}色墨辊运行`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingInkRollerOperation`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.10 M10
        {
          code: 5,
          name: `${key}色横移修正`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorHorizontalShiftUpdate`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.11 M11
        {
          code: 5,
          name: `${key}色网棍间隙修正`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorScreenBarGapUpdate`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.12 M12
        {
          code: 5,
          name: `${key}色横移修正`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPrintingGapUpdate`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.13 M13
        {
          leng: 2
        },
        {
          code: 5,
          name: `${key}色压印绝归`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorImprintingBtn`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w0.15 M15
        {
          leng: 32
        }, //W1.15 M31
        {
          leng: 32
        }, //w2.15 M47
        // {
        //   code: 5,
        //   name: `${key}色径向伺服故障`,
        //   pName: '印刷1单元-故障',
        //   funId: `${key}Printing200`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.00 M32
        // {
        //   code: 5,
        //   name: `${key}色轴向伺服故障`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing201`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.01 M33
        // {
        //   code: 5,
        //   name: `${key}色压印超上限`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: '1Printing202',
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.02 M34
        // {
        //   code: 5,
        //   name: `${key}色压印超下限`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: '1Printing203',
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.03 M35
        // {
        //   code: 5,
        //   name: `${key}色着墨超上限`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: '1Printing204',
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.04 M36
        // {
        //   code: 5,
        //   name: `${key}色着墨超下限`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing205`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.05 M37
        // {
        //   code: 5,
        //   name: `${key}色风机变频故障`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing206`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.06 M38
        // {
        //   code: 5,
        //   name: `${key}色输送皮带故障`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing207`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.07 M39
        // {
        //   code: 5,
        //   name: `${key}色压印伺服故障`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing208`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.08 M40
        // {
        //   code: 5,
        //   name: `${key}色着墨伺服故障`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing209`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.09 M41
        // {
        //   code: 5,
        //   name: `${key}色轴向右限超限`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing210`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.10 M42
        // {
        //   code: 5,
        //   name: `${key}色轴向左限超限`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing211`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.11 M43
        // {
        //   code: 5,
        //   name: `${key}色缺墨报警`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing212`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.12 M44
        // {
        //   code: 5,
        //   name: `${key}色伺服报警`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing213`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.13 M45
        // {
        //   leng: 2
        // }, //W2.14 M46
        // {
        //   code: 5,
        //   name: `${key}色热过载报警`,
        //   pName: `印刷${key}单元-故障`,
        //   funId: `${key}Printing215`,
        //   describes: '',
        //   type: 'bool',
        //   leng: 2,
        //   decimalPlaces: 0
        // }, //W2.15 M47
        {
          code: 5,
          name: `${key}色墨泵运行`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingInkPumpOperation`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w3.00 M48
        {
          leng: 8
        }, //W3.11 M52
        {
          code: 5,
          name: `${key}色检测皮带`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorTestingBelts`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w3.05 M53
        {
          leng: 12
        }, //W3.11 M59
        {
          code: 5,
          name: `${key}色归零切换`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorZeroSwitching`,
          describes: '1展示位置  0不展示',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w3.12 M60
        {
          leng: 38
        },
        {
          code: 5,
          name: `${key}色风机启停`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorFanStartStop`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w5.0 M80
        {
          code: 5,
          name: `${key}色风道1`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorAirDuct1`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w5.1 M81
        {
          code: 5,
          name: `${key}色风道2`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorAirDuct2`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w5.2 M82
        {
          code: 5,
          name: `${key}色风道3`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorAirDuct3`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w5.3 M83
        {
          leng: 92
        }, //W8.1 M129
        {
          code: 5,
          name: `${key}色松刹`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorReleaseBrake`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //w8.2 M130
        {
          code: 5,
          name: `${key}色相位确定`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPhaseSeal`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //W8.03 M131
        {
          leng: 42
        }, //W9.8 M152
        {
          code: 5,
          name: `${key}色墨泵强制`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorInkPumpForced`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        } //W9.9 M153
      ]
    },
    {
      id: '01',
      code: 1,
      type: 'M',
      offset: 0,
      startOffset: 4008,
      modId: 1,
      modbusId: `51${key}`,
      plcId: `${key}color`,
      list: [
        {
          code: 5,
          name: `${key}色墨辊灯`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingInkRollerStart`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //W250.8 M4008
        {
          leng: 26
        },
        {
          code: 5,
          name: `${key}色横移确定`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorHorizontalShiftSeal`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //W251.6 M4022
        {
          code: 5,
          name: `${key}色印压间隙确定`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPrintingGapSeal`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //W251.7 M4023
        {
          leng: 4
        },
        {
          code: 5,
          name: `${key}色网棍间隙确定`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorScreenBarGapSeal`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        } //W251.10 M4026
      ]
    },
    {
      id: '01',
      code: 1,
      type: 'M',
      offset: 0,
      startOffset: 3200,
      modId: 1,
      modbusId: `51${key}`,
      plcId: `${key}color`,
      list: [
        {
          code: 5,
          name: `${key}色墨辊升降`,
          pName: `印刷${key}单元`,
          funId: `${key}PrintingInkRollerTop`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        }, //W200.0 M3200
        {
          leng: 36
        },
        {
          code: 5,
          name: `${key}色相位修正(清零)`,
          pName: `印刷${key}单元`,
          funId: `${key}ColorPhaseUpdate`,
          describes: '',
          type: 'bool',
          leng: 2,
          decimalPlaces: 0
        } //W201.3 M3219
      ]
    }
  );
}

export default printUnitList;
